{% extends 'home.html' %}
{% block content_main %}
    <div class="panel panel-info">
        <div class="panel-heading">
            <h3 class="panel-title">图书添加页面</h3>
        </div>
        <div class="panel-body">
            <form action="" method="post">
                <div class="form-group">
                    <label for="Title">书名</label>
                    <input type="text" id="Title" class="form-control" name="title" required>
                </div>
                <div class="form-group">
                    <label for="Price">价格</label>
                    <input type="text" id="Price" class="form-control" name="price" required>
                </div>
                <div class="form-group">
                    <label for="summary">简介</label>
                    <input type="text" id="summary" class="form-control" name="summary" required>
                </div>
                <div class="form-group">
                    <label for="cover">封面链接</label>
                    <input type="text" id="cover" class="form-control" name="cover" required>
                </div>
                <div class="form-group">
                    <label for="link">图书链接</label>
                    <input type="text" id="link" class="form-control" name="link" required>
                </div>
                <div class="form-group">
                    <label for="publish_name">出版社</label>
                    <select name="publish_id" id="publish_name">
                        {% for date in publish_all %}
                            <option value="{{ date.pk }}">{{ date.name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <div class="form-group">
                    <label for="author">作者</label>
                    <select name="author_id" id="author" multiple="multiple">
                        {% for date in author_all %}
                            <option value="{{ date.pk }}">{{ date.name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <button type="submit" class="btn btn-success">提交</button>
            </form>
        </div>
    </div>
{% endblock %}